/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package coda.util;

/**
 *
 * @author pan
 */
public class StringUtil {

    public static String unquote(String s) {
        if (s == null || s.isEmpty() || (!s.startsWith("\"") && !s.endsWith("\""))) {
            return s;
        } else {
            if (s.startsWith("\"")) {
                s = s.substring(1);
            }
            if (s.endsWith("\"")) {
                s = s.substring(0, s.length() - 1);
            }
            return s;
        }
    }

}
